<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/demo/currency/Currency.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/demo/currency/Currency.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'MoneyId',
                footer: "Foots",
                cnName: '币别管理',
                name: 'currency/Currency',
                url: "/Currency/",
                sortName: "MoneyId"
            });
            const editFormFields = ref({"MoneyName":"","MoneyRate":"","MoneyRemark":""});
            const editFormOptions = ref([[{"title":"币别名称","field":"MoneyName","type":"text"}],
                              [{"title":"对人民币汇率","field":"MoneyRate","type":"text"}],
                              [{"title":"备注","field":"MoneyRemark","type":"textarea"}]]);
            const searchFormFields = ref({"MoneyName":"","MoneyRate":"","MoneyRemark":""});
            const searchFormOptions = ref([[{"title":"币别名称","field":"MoneyName"}],[{"title":"对人民币汇率","field":"MoneyRate","type":"decimal"}],[{"title":"备注","field":"MoneyRemark"}]]);
            const columns = ref([{field:'MoneyId',title:'MoneyId',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'MoneyName',title:'币别名称',type:'string',width:110,align:'left',sort:true},
                       {field:'MoneyRate',title:'对人民币汇率',type:'decimal',width:110,align:'left'},
                       {field:'MoneyRemark',title:'备注',type:'string',width:110,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
